package com.ruoyi.douyin.controller.excel;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.douyin.vo.excel.BaseVideoVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/douyin/excel/video")
public class ExcelVideoController {

    @Log(title = "视频的基础数据", businessType = BusinessType.EXPORT)
    @PreAuthorize("@ss.hasPermi('system:user:export')")
    @GetMapping("/base")
    public AjaxResult getVideo(List<BaseVideoVo> baseVideoVos) {
        ExcelUtil<BaseVideoVo> util = new ExcelUtil<>(BaseVideoVo.class);
        return util.exportExcel(baseVideoVos, "视频的基础数据");
    }
}
